<!-- 使用 type="home" 属性设置首页，其他页面不需要设置，默认为page；推荐使用json5，更强大，且允许注释 -->
<route lang="json5">
{
  style: {
    navigationBarTitleText: '详情',
    enablePullDownRefresh: false,
  },
}
</route>
<template>
  <view>
    <view class="mx-4" v-if="!loading && data">
      <view class="mt-6 text-[#343434] text-[36rpx] font-bold">{{ data.name }}</view>
      <view class="text-[#7E848F] mt-[20rpx] mb-4">{{ data.publish_time }}</view>

      <view class="text-[22rpx]">
        <uv-parse :content="imgDeal(data.row.content)"></uv-parse>
      </view>
    </view>
  </view>
</template>

<script setup>
import { fetchMessageDetail } from '@/service/message'
import useRequest from '@/hooks/useRequest'
import { imgDeal } from '@/utils/format'

const { run, data, loading } = useRequest(fetchMessageDetail)

onLoad((options) => {
  run(options.id)
})
</script>

<style lang="scss" scoped></style>
